package com.test.multithread.designPattern;

public class OffNovelBook extends NovelBook{

   OffNovelBook(String name, int price, String author){
       super(name, price, author);
   }

   //覆写价格方法，当价格大于40，就打8析，其他价格就打9析
   public int getPrice(){
     if(this.price > 100){
        return this.price * 8 /10;
     }else{
        return this.price * 9 /10;
     }     
   } 
}
